#define _CRT_SECURE_NO_WARNINGS
//1.C version
#if 1
#include<stdio.h>
int main()
{
	for (int ABC = 100; ABC < 999; ABC++)
	{
		int A = ABC / 100 % 10;
		int B = ABC / 10 % 10;
		int C = ABC % 10;
		if (ABC == A * A * A + B * B * B + C * C * C)
		{
			printf("%d\n", ABC);
		}
	}
	return 0;
}
#endif
//2.C++ version
#if 0
#include<iostream>
using namespace std;
int main()
{
	for (int ABC = 100; ABC < 999; ABC++)
	{
		int A, B, C;
		A = ABC / 100;
		B = ABC / 10 % 10;
		C = ABC % 10;
		if (ABC == A * A * A + B * B * B + C * C * C)
		{
			cout << ABC << endl;
		}
	}
	return 0;
}
#endif